/**
  * @FileName: TelephonyUtils.java
  * @Package:com.bdtop.dbl.utils
  * @Description: TODO
  * @author: MingjunLi
  * @date:2014-9-25
  * @version V1.0
  */
package com.bdtop.dbl.utils;

import android.annotation.TargetApi;
import android.content.Context;
import android.content.pm.PackageManager;
import android.os.Build;
import android.telephony.TelephonyManager;

/**
 * @ClassName: TelephonyUtils
 * @Description: TODO
 * @author: MingjunLi
 * @date:2014-9-25
 */
public class SystemUtils {
    
    public static String getImeiCode(Context context) {
        String imei = "";
        TelephonyManager telephonyManager = (TelephonyManager) context
                .getSystemService(Context.TELEPHONY_SERVICE);
        imei = telephonyManager.getDeviceId();
        return imei;
    }
    
    public static String getImsiCode(Context context) {
        String imsi = "";
        TelephonyManager telephonyManager = (TelephonyManager) context
                .getSystemService(Context.TELEPHONY_SERVICE);
        imsi = telephonyManager.getSubscriberId();
        return imsi;
    }
    
    @TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR2)
    public static boolean supportBLE(Context context) {
        return context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_BLUETOOTH_LE);
    }

}
